package com.webtest.demo;

import java.awt.Desktop.Action;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import org.openqa.selenium.WebDriver;

import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Listeners;
import org.testng.annotations.Test;

import com.webtest.core.WebTestListener2;



@Listeners({WebTestListener2.class})
public class CrossearthPageTest extends BaseDriver{
	
	CrossearthPage crossearthPage;
	
	@BeforeMethod
	public void init() throws InterruptedException {
		resetEmulatorState();
		crossearthPage=new CrossearthPage(driver);	
	}


	private void resetEmulatorState() {
		
	}

	//一、点击播放按钮后的软件的登录页面
	@Test(priority = 6,description = "不输入用户名及密码直接登录")	
	public void directlyloginCrossearth() throws InterruptedException {
		crossearthPage.directlyLogin();
		crossearthPage.goback();		
	}
	
	@Test(priority = 7,description = "使用快捷键Ctrl+C/V复制粘贴用户名及密码进行登录")	
	public void shortcutkeyloginCrossearth() throws InterruptedException {
		crossearthPage.shortcutkeyLogin();		
	}
	
	@Test(priority = 8,description = "输入正确用户名和密码进行登录")	
	public void rightloginCrossearth() throws InterruptedException {
		crossearthPage.rightLogin();		
	}
	
	
	@Test(priority = 9,description = "用户名和密码均输入两次回车进行登录")	
	public void doubleenterloginCrossearth() throws InterruptedException {
		crossearthPage.doubleenterLogin();		
	}
	
	@Test(priority = 10,description = "输入用户名和密码步骤间插入点击忘记密码操作")	
	public void insertloginCrossearth() throws InterruptedException {
		crossearthPage.insertLogin();		
	}
	
	@Test(priority = 11,description = "用户名输入特殊字符@#$%进行登录")	
	public void specialloginCrossearth() throws InterruptedException {
		crossearthPage.specialLogin();		
	}
	
	@Test(priority = 12,description = "用户名输入脚本函数进行登录")	
	public void scriptloginCrossearth() throws InterruptedException {
		crossearthPage.scriptLogin();		
	}
	
	@Test(priority = 13,description = "用户名输入汉字+数字组合朱颖6666进行登录")	
	public void combineloginCrossearth() throws InterruptedException {
		crossearthPage.combineLogin();		
	}
	
	@Test(priority = 14,description = "密码输入空格进行登录")	
	public void spaceloginCrossearth() throws InterruptedException {
		crossearthPage.spaceLogin();		
	}
	
	@Test(priority = 15,description = "输入未注册的用户名进行登录")	
	public void notregisteredloginCrossearth() throws InterruptedException {
		crossearthPage.notregisteredLogin();		
	}
	
	
	//二、注册页面
	@Test(priority = 16,description = "不输入任何文本直接注册")	
	public void directlyregistrationCrossearth() throws InterruptedException {
		//crossearthPage.enter();
		//crossearthPage.enter();
		crossearthPage.directlyRegistration();
				
	}
	
	@Test(priority = 17,description = "输入正确邮箱、昵称和密码进行注册")	
	public void rightregistrationCrossearth() throws InterruptedException {
		crossearthPage.rightRegistration();
				
	}
	
	@Test(priority = 18,description = "输入邮箱、昵称和密码步骤间插入返回操作进行注册")	
	public void insertregistrationCrossearth() throws InterruptedException {
		//crossearthPage.enter();
		//crossearthPage.enter();
		crossearthPage.insertRegistration();
				
	}
	
	@Test(priority = 19,description = "密码输入特殊字符+空格+数字+汉字组合*& 23朱颖进行登录")	
	public void combineregistrationCrossearth() throws InterruptedException {
		crossearthPage.combineRegistration();
				
	}
	
	@Test(priority = 20,description = "填完信息后重新覆盖信息进行注册")	
	public void coverregistrationCrossearth() throws InterruptedException {
		crossearthPage.coverRegistration();
				
	}
	
	@Test(priority = 21,description = "昵称输入100个字符")	
	public void hundredregistrationCrossearth() throws InterruptedException {
		//crossearthPage.enter();
		//crossearthPage.enter();
		crossearthPage.hundredRegistration();
				
	}
	
	@Test(priority = 22,description = "邮箱及昵称输入脚本函数进行注册")	
	public void scriptregistrationCrossearth() throws InterruptedException {
		crossearthPage.scriptRegistration();
				
	}
	
	@Test(priority = 23,description = "昵称输入特殊字符*&……%")	
	public void specialregistrationCrossearth() throws InterruptedException {
		crossearthPage.specialRegistration();
				
	}
	
	@Test(priority = 24,description = "注册已经用过的邮箱")	
	public void existregistrationCrossearth() throws InterruptedException {
		crossearthPage.existRegistration();
				
	}
	
	@Test(priority = 25,description = "注册已经存在的用户昵称")	
	public void nickregistrationCrossearth() throws InterruptedException {
		//crossearthPage.enter();
		//crossearthPage.enter();
		crossearthPage.nickRegistration();
		crossearthPage.goback();				
	}
	

}
